package com.mk.cloud.common.domain;

import org.beetl.sql.core.annotatoin.AssignID;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.Table;
import org.beetl.sql.core.annotatoin.TableTemplate;
import org.beetl.sql.core.mapper.BaseMapper;

import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/*
* 
* gen by beetlsql 2018-04-04
*/
@Table(name="p_buyer_address")
@TableTemplate("order by isdefault desc")
public class PBuyerAddress   implements Serializable{
	//主键
	@AssignID
	private String gbid ;
	//用户标识
	private String fuserid ;
	//详细地址
	private String gbaddress ;
	//区域代码
	private String gbareacode ;
	//区域名称
	private String gbareaname ;
	//市代码
	private String gbcitycode ;
	//市名称
	private String gbcityname ;
	//买家联系人
	private String gbcontacts ;
	//联系电话
	private String gbphone ;
	//省代码
	private String gbprovincecode ;
	//省名称
	private String gbprovincename ;
	//是否默认（0否，1是）
	private String isdefault ;
	private String coid;

	//店铺名称
	private String shopname;

	public String getCoid() {
		return coid;
	}

	public void setCoid(String coid) {
		this.coid = coid;
	}
	
	public PBuyerAddress() {
	}

	public String getShopname() {
		return shopname;
	}

	public void setShopname(String shopname) {
		this.shopname = shopname;
	}

	public String getGbid(){
		return  gbid;
	}
	public void setGbid(String gbid ){
		this.gbid = gbid;
	}
	
	public String getFuserid(){
		return  fuserid;
	}
	public void setFuserid(String fuserid ){
		this.fuserid = fuserid;
	}
	
	public String getGbaddress(){
		return  gbaddress;
	}
	public void setGbaddress(String gbaddress ){
		this.gbaddress = gbaddress;
	}
	
	public String getGbareacode(){
		return  gbareacode;
	}
	public void setGbareacode(String gbareacode ){
		this.gbareacode = gbareacode;
	}
	
	public String getGbareaname(){
		return  gbareaname;
	}
	public void setGbareaname(String gbareaname ){
		this.gbareaname = gbareaname;
	}
	
	public String getGbcitycode(){
		return  gbcitycode;
	}
	public void setGbcitycode(String gbcitycode ){
		this.gbcitycode = gbcitycode;
	}
	
	public String getGbcityname(){
		return  gbcityname;
	}
	public void setGbcityname(String gbcityname ){
		this.gbcityname = gbcityname;
	}
	
	public String getGbcontacts(){
		return  gbcontacts;
	}
	public void setGbcontacts(String gbcontacts ){
		this.gbcontacts = gbcontacts;
	}
	
	public String getGbphone(){
		return  gbphone;
	}
	public void setGbphone(String gbphone ){
		this.gbphone = gbphone;
	}
	
	public String getGbprovincecode(){
		return  gbprovincecode;
	}
	public void setGbprovincecode(String gbprovincecode ){
		this.gbprovincecode = gbprovincecode;
	}
	
	public String getGbprovincename(){
		return  gbprovincename;
	}
	public void setGbprovincename(String gbprovincename ){
		this.gbprovincename = gbprovincename;
	}
	
	public String getIsdefault(){
		return  isdefault;
	}
	public void setIsdefault(String isdefault ){
		this.isdefault = isdefault;
	}

	public interface Mapper extends BaseMapper<PBuyerAddress> {
		/**
		 * 将用户的默认地址改为非默认
		 * @param fuserid
		 * @return
		 */
		Integer updateToNotDefault(@Param("fuserid") String fuserid);

		/**
		 * 地址列表
		 * @param fuserid
		 * @return
		 */
		List<PBuyerAddress> getAddressList(@Param("fuserid") String fuserid);

		/**
		 * 根据主键查询
		 * @param gbid
		 * @return
		 */
		PBuyerAddress getAddressById(@Param("gbid") String gbid);
	}
	

}
